import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NZ_I18N } from 'ng-zorro-antd/i18n';
import { zh_CN } from 'ng-zorro-antd/i18n';
import { CKEditorModule } from '@ckeditor/ckeditor5-angular';
import { CommonModule, registerLocaleData } from '@angular/common';
import zh from '@angular/common/locales/zh';
import { LoginComponent } from './login/login.component';
import { NzAlertModule, NzBreadCrumbModule,NzSwitchModule , NzAvatarModule,NzDrawerModule ,NzTreeModule , NzTagModule, NzToolTipModule, NzButtonModule, NzCardModule, NzCarouselModule, NzCheckboxModule, NzCollapseModule, NzDatePickerModule, NzDividerModule, NzDropDownModule, NzFormModule, NzGridModule, NzIconModule, NzInputModule, NzInputNumberModule, NzMenuModule, NzMessageModule, NzModalModule, NzProgressModule, NzRadioModule, NzSelectModule, NzStatisticModule, NzTableModule, NzTabsModule, NzUploadModule, NzSkeletonModule, NzPaginationModule } from 'ng-zorro-antd';
import { CustomInterceptorModule } from 'src/custom-interceptor.module';
import { ServiceModule } from './service/service.module';
import { MainComponent } from './main/main.component';
import { IndexComponent } from './main/index/index.component';
import { PasswordComponent } from './main/password/password.component';
import { LiveLibComponent } from './main/live-lib/live-lib.component';
import { VodLibComponent } from './main/vod-lib/vod-lib.component';
import { OnlinePayComponent } from './main/online-pay/online-pay.component';
import { OfflinePayComponent } from './main/offline-pay/offline-pay.component';
import { RechargeComponent } from './main/recharge/recharge.component';
import { PayLogComponent } from './main/pay-log/pay-log.component';
import { SecurityComponent } from './main/security/security.component';
import { ProfileComponent } from './main/profile/profile.component';
import { RealAuthComponent } from './main/real-auth/real-auth.component';
import { WorkOrderComponent } from './main/work-order/work-order.component';
import { AddComponent as WorkOrderAddComponent } from './main/work-order/add/add.component';
import { ImageViewComponent } from './component/image-view/image-view.component';
import { OfflinePayLogComponent } from './main/offline-pay-log/offline-pay-log.component';
import { OnlinePayLogComponent } from './main/online-pay-log/online-pay-log.component';
import { VodPubComponent } from './main/vod-pub/vod-pub.component';
import { RefuseWordsComponent } from './main/refuse-words/refuse-words.component';
import { PageEditorComponent } from './main/page-editor/page-editor.component';
import { PageEditorDetailComponent } from './main/page-editor/page-editor-detail/page-editor-detail.component';
import { TitleEditorComponent } from './main/page-editor/els/title-editor/title-editor.component';
import { ColorPickerModule } from 'ngx-color-picker';
import { BackgroundEditorComponent } from './main/page-editor/els/background-editor/background-editor.component';
import { PlayerEditorComponent } from './main/page-editor/els/player-editor/player-editor.component';
import { RoomListEditorComponent } from './main/page-editor/els/room-list-editor/room-list-editor.component';
import { AdverEditorComponent } from './main/page-editor/els/adver-editor/adver-editor.component';
import { StaticEditorComponent } from './main/page-editor/els/static-editor/static-editor.component';
import { SCkeditorComponent } from './component/ckeditor/s-ckeditor/s-ckeditor.component';
import { DanmuListEditorComponent } from './main/page-editor/els/danmu-list-editor/danmu-list-editor.component';
import { DanmuEditorComponent } from './main/page-editor/els/danmu-editor/danmu-editor.component';
import { DragulaModule, DragulaService } from "ng2-dragula";
import { PreviewComponent } from './main/page-editor/preview/preview.component';
import { TabsEditorComponent } from './main/page-editor/els/tabs-editor/tabs-editor.component';
import { VodCategoryComponent } from './main/vod-category/vod-category.component';
import { PlayerComponent } from './component/player/player.component';
import { LiveService } from './service/live.service';
import { AccountComponent } from './main/account/account.component';
import { UserComponent } from './main/user/user.component';
import { WorkComponent } from './main/work/work.component';
import { VodComponent } from './main/vod/vod.component';
import { LiveComponent } from './main/live/live.component';
import { LiveDetailComponent } from './main/live-detail/live-detail.component';
import { CollectPlatformComponent } from './main/collect-platform/collect-platform.component';
import { VideoPlayerComponent } from './component/video-player/video-player.component';
import { CollectplatformEditorComponent } from './main/page-editor/els/collectplatform-editor/collectplatform-editor.component';
import { TimeDetailComponent } from './main/time-detail/time-detail.component';

registerLocaleData(zh);

@NgModule({
  declarations: [
    AppComponent,
    LoginComponent,
    MainComponent,
    IndexComponent,
    PasswordComponent,
    LiveLibComponent,
    VodLibComponent,
    OnlinePayComponent,
    OfflinePayComponent,
    RechargeComponent,
    PayLogComponent,
    SecurityComponent,
    ProfileComponent,
    RealAuthComponent,
    WorkOrderComponent,
    WorkOrderAddComponent,
    ImageViewComponent,
    OfflinePayLogComponent,
    OnlinePayLogComponent,
    VodPubComponent,
    RefuseWordsComponent,
    PageEditorComponent,
    PageEditorDetailComponent,
    TitleEditorComponent,
    BackgroundEditorComponent,
    PlayerEditorComponent,
    RoomListEditorComponent,
    AdverEditorComponent,
    StaticEditorComponent,
    SCkeditorComponent,
    DanmuListEditorComponent,
    DanmuEditorComponent,
    PreviewComponent,
    TabsEditorComponent,
    VodCategoryComponent,
    PlayerComponent,
    AccountComponent,
    UserComponent,
    WorkComponent,
    VodComponent,
    LiveComponent,
    LiveDetailComponent,
    CollectPlatformComponent,
    VideoPlayerComponent,
    CollectplatformEditorComponent,
    TimeDetailComponent
  ],
  imports: [
    CommonModule,
    BrowserModule,
    AppRoutingModule,
    HttpClientModule,
    BrowserAnimationsModule,
    NzButtonModule,
    NzToolTipModule,
    NzIconModule,
    NzGridModule,
    NzBreadCrumbModule,
    NzDropDownModule,
    ColorPickerModule,
    NzSwitchModule,
    NzTableModule,
    NzInputModule,
    NzTagModule,
    NzCheckboxModule,
    NzRadioModule,
    NzFormModule,
    NzTreeModule,
    NzModalModule,
    NzMessageModule,
    NzInputNumberModule,
    CKEditorModule,
    NzCarouselModule,
    NzMenuModule,
    NzDrawerModule,
    NzTabsModule,
    NzUploadModule,
    NzDividerModule,
    NzAvatarModule,
    NzSkeletonModule,
    NzCollapseModule,
    NzProgressModule,
    NzAlertModule,
    NzSelectModule,
    NzStatisticModule,
    NzCardModule,
    NzDatePickerModule,
    NzPaginationModule,
    FormsModule,
    ReactiveFormsModule,
    ServiceModule,
    DragulaModule.forRoot(),
  ],
  providers: [
    DragulaService,
    LiveService,
    {
      provide: NZ_I18N,
      useValue: zh_CN,

    },
    {
      provide: HTTP_INTERCEPTORS,
      useClass: CustomInterceptorModule,
      multi: true
    }
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
